#include "Server.hpp"
#include <memory>

void Uages()
{
    std::cerr << "Uages\n\t:  ./Server.exe port" << std::endl;
    std::cerr << std::endl;
}

std::string ProcessRuquset(std::string str)
{
    return str;
}

// ./Server.exe port   //启动服务器
int main(int argc , char* argv[])
{
    if(argc != 2)
    {
        Uages();
        exit(CIN_ERRON);
    }
    
    std::unique_ptr<ServerFile::Server> ser(new ServerFile::Server(ProcessRuquset,atoi(argv[1])));

    ser->init();

    ser->start();

    return 0;
}